Optimal. Leaf size=39 \[ -\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x}{2 c}+\frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {5328, 197}
\begin {gather*} \frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right )-\frac {b x \sqrt {1-\frac {1}{c^2 x^2}}}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 197
Rule 5328
Rubi steps
\begin {align*} \int x \left (a+b \sec ^{-1}(c x)\right ) \, dx &=\frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right )-\frac {b \int \frac {1}{\sqrt {1-\frac {1}{c^2 x^2}}} \, dx}{2 c}\\ &=-\frac {b \sqrt {1-\frac {1}{c^2 x^2}} x}{2 c}+\frac {1}{2} x^2 \left (a+b \sec ^{-1}(c x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 50, normalized size = 1.28 \begin {gather*} \frac {a x^2}{2}-\frac {b x \sqrt {\frac {-1+c^2 x^2}{c^2 x^2}}}{2 c}+\frac {1}{2} b x^2 \sec ^{-1}(c x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 65, normalized size = 1.67
method | result | size |
derivativedivides | \(\frac {\frac {c^{2} x^{2} a}{2}+b \left (\frac {c^{2} x^{2} \mathrm {arcsec}\left (c x \right )}{2}-\frac {c^{2} x^{2}-1}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}\right )}{c^{2}}\) | \(65\) |
default | \(\frac {\frac {c^{2} x^{2} a}{2}+b \left (\frac {c^{2} x^{2} \mathrm {arcsec}\left (c x \right )}{2}-\frac {c^{2} x^{2}-1}{2 \sqrt {\frac {c^{2} x^{2}-1}{c^{2} x^{2}}}\, c x}\right )}{c^{2}}\) | \(65\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 37, normalized size = 0.95 \begin {gather*} \frac {1}{2} \, a x^{2} + \frac {1}{2} \, {\left (x^{2} \operatorname {arcsec}\left (c x\right ) - \frac {x \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{c}\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.41, size = 40, normalized size = 1.03 \begin {gather*} \frac {b c^{2} x^{2} \operatorname {arcsec}\left (c x\right ) + a c^{2} x^{2} - \sqrt {c^{2} x^{2} - 1} b}{2 \, c^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.32, size = 58, normalized size = 1.49 \begin {gather*} \frac {a x^{2}}{2} + \frac {b x^{2} \operatorname {asec}{\left (c x \right )}}{2} - \frac {b \left (\begin {cases} \frac {\sqrt {c^{2} x^{2} - 1}}{c} & \text {for}\: \left |{c^{2} x^{2}}\right | > 1 \\\frac {i \sqrt {- c^{2} x^{2} + 1}}{c} & \text {otherwise} \end {cases}\right )}{2 c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 634 vs.
\(2 (33) = 66\).
time = 0.42, size = 634, normalized size = 16.26 \begin {gather*} \frac {1}{2} \, c {\left (\frac {b \arccos \left (\frac {1}{c x}\right )}{c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}} + \frac {a}{c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}} - \frac {2 \, b {\left (\frac {1}{c^{2} x^{2}} - 1\right )} \arccos \left (\frac {1}{c x}\right )}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{2}} - \frac {2 \, b \sqrt {-\frac {1}{c^{2} x^{2}} + 1}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}} - \frac {2 \, a {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {b {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2} \arccos \left (\frac {1}{c x}\right )}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{4}} + \frac {2 \, b {\left (-\frac {1}{c^{2} x^{2}} + 1\right )}^{\frac {3}{2}}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{3}} + \frac {a {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (c^{3} + \frac {2 \, c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}}{{\left (\frac {1}{c x} + 1\right )}^{2}} + \frac {c^{3} {\left (\frac {1}{c^{2} x^{2}} - 1\right )}^{2}}{{\left (\frac {1}{c x} + 1\right )}^{4}}\right )} {\left (\frac {1}{c x} + 1\right )}^{4}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.67, size = 40, normalized size = 1.03 \begin {gather*} \frac {a\,x^2}{2}+\frac {b\,x^2\,\mathrm {acos}\left (\frac {1}{c\,x}\right )}{2}-\frac {b\,x\,\sqrt {1-\frac {1}{c^2\,x^2}}}{2\,c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________